package com.rmy.queue.service.impl;

import java.util.List;
import com.rmy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rmy.queue.mapper.QmsPublishRecordMapper;
import com.rmy.queue.domain.QmsPublishRecord;
import com.rmy.queue.service.IQmsPublishRecordService;

/**
 * 发布记录Service业务层处理
 * 
 * @author rmy
 * @date 2022-11-11
 */
@Service
public class QmsPublishRecordServiceImpl implements IQmsPublishRecordService 
{
    @Autowired
    private QmsPublishRecordMapper qmsPublishRecordMapper;

    /**
     * 查询发布记录
     * 
     * @param id 发布记录主键
     * @return 发布记录
     */
    @Override
    public QmsPublishRecord selectQmsPublishRecordById(Long id)
    {
        return qmsPublishRecordMapper.selectQmsPublishRecordById(id);
    }

    /**
     * 查询发布记录列表
     * 
     * @param qmsPublishRecord 发布记录
     * @return 发布记录
     */
    @Override
    public List<QmsPublishRecord> selectQmsPublishRecordList(QmsPublishRecord qmsPublishRecord)
    {
        return qmsPublishRecordMapper.selectQmsPublishRecordList(qmsPublishRecord);
    }

    /**
     * 新增发布记录
     * 
     * @param qmsPublishRecord 发布记录
     * @return 结果
     */
    @Override
    public int insertQmsPublishRecord(QmsPublishRecord qmsPublishRecord)
    {
        qmsPublishRecord.setCreateTime(DateUtils.getNowDate());
        return qmsPublishRecordMapper.insertQmsPublishRecord(qmsPublishRecord);
    }

    /**
     * 修改发布记录
     * 
     * @param qmsPublishRecord 发布记录
     * @return 结果
     */
    @Override
    public int updateQmsPublishRecord(QmsPublishRecord qmsPublishRecord)
    {
        return qmsPublishRecordMapper.updateQmsPublishRecord(qmsPublishRecord);
    }

    /**
     * 批量删除发布记录
     * 
     * @param ids 需要删除的发布记录主键
     * @return 结果
     */
    @Override
    public int deleteQmsPublishRecordByIds(Long[] ids)
    {
        return qmsPublishRecordMapper.deleteQmsPublishRecordByIds(ids);
    }

    /**
     * 删除发布记录信息
     * 
     * @param id 发布记录主键
     * @return 结果
     */
    @Override
    public int deleteQmsPublishRecordById(Long id)
    {
        return qmsPublishRecordMapper.deleteQmsPublishRecordById(id);
    }
}
